package model.commands.environment;

import java.util.List;
import model.Environment;
import model.SyntaxErrorException;
import model.commands.Command;

/**
 * Name:
 * SETGRIDSIZE pixels
 * SETGS pixels
 * 
 * Description:
 * sets the size of the grid scale.
 * returns given pixels
 *
 * @author Angelica Schwartz
 */
public class SetGridSizeCommand extends Command {
    
    @Override
    public int evaluate(Environment e) throws SyntaxErrorException {
        List<Command> arguments = getArguments();
        int gridSize = arguments.get(0).evaluate(e);
        e.setGridSize(gridSize);
        return gridSize;
    }

}
